<link href="<?php echo base_url(); ?>./css/jdate_picker/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery-1.7.2.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.widget.js"></script>


<script language="javascript" type="text/javascript">
    $(function() {
        $( ".datepicker" ).datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'yy:mm:dd'
        });
    });

</script>

<style type="text/css">
    .task1 p{ color: red;font-size: 12px;}
    span{color:red;}
</style>

<div class="task1">
    <?php
    if ($this->session->userdata('ms_error')) {
        echo message($this->session->userdata('ms_error'), "error");
        $this->session->unset_userdata("ms_error");
    }

    echo form_open('teacher/add');
    echo '<div class="form-wrapper">';
    echo '<fieldset style="margin: 0 auto;width:75%;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">';
    echo '<legend align="center"><div class="heading" style="margin: 0 auto;width: 100%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;">Add new Teacher</div></legend>';
    echo '<div style="float: right; border: 0px #ccc solid;">';
    echo anchor('teacher/manager', img('images/user_images/cancel.png'));
    echo '</div>';
    echo '<table  align="center">';
    echo '<tr>';
    echo '<td valign="top">TeacherName<span>*</span></td>';
    echo '<td>' . form_input(array('name' => 'txtTeach_n', 'id' => 'idpass', 'value' => $this->input->post("txtTeach_n") ? $this->input->post("txtTeach_n") : " ")) . form_error('txtTeach_n') . '</td>';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td valign="top">StudentNumber</td>';
    echo '<td>' . form_input(array('name' => 'txtstu_n', 'value' => $this->input->post("txtstu_n") ? $this->input->post("txtstu_n") : " ")) . form_error('txtstu_n') . '</td>';
    echo '</tr>';
    ?> 
    <tr>
        <td valign='top'>Date</td>
        <td><input type="text" name="txtdate" class="datepicker" value="<?php echo ($this->input->post("txtdate")) ? $this->input->post("txtdate") : "" ?>" /><?php echo form_error('text_dob'); ?></td> 

    </tr>
<?php
echo '<tr>';
echo '<td valign="top">Time</td>';
echo '<td>' . form_input(array('name' => 'txtclas_time', 'id' => 'idemail', 'value' => $this->input->post("txtclas_time") ? $this->input->post("txtclas_time") : " ")) . form_error('txtclas_time') . '</td>';
echo '</tr>';
echo '<tr>';
echo '<td valign="top">Detail</td>';
echo '<td> ' . form_textarea(array('name' => 'txtarea', 'rows' => '8', 'cols' => '50', 'value' => $this->input->post("txtarea") ? $this->input->post("txtarea") : " ")) . form_error('txtarea') . '</td>';
echo '</tr>';
echo '<tr>';
echo '<td></td>';
echo '<td>' . form_submit('btn_submit', 'Add') . form_reset('btn_reset', 'Reset') . '</td>';
echo '</tr>';
echo '</table>';
echo '</fieldset>';
echo '</div>';
echo form_close();
?>
</div>